srand — Random Seed


\begin{rail}
RandomSeed : 'srand' '(' ( () \vert Scalar \vert ''clock'' ) ')' ;
\end{rail}
srand is used to set the seed for the random number generator routines in rand. With no arguments, srand resets the seed value to the last value which was set, or to 1, which is the seed value on startup, if it hasn't been set since. If a scalar argument is provided, it becomes the new seed. If the string "clock" is used as the argument, the seed is set from the internal clock. The latter method will provide unique values.

Subsections